﻿<ResourceDictionary 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:sys="clr-namespace:System;assembly=mscorlib"
    xmlns:v="clr-namespace:ShredTheLog.Views;assembly=ShredTheLog.Views"
    xmlns:vm="clr-namespace:ShredTheLog.ViewModels;assembly=ShredTheLog.ViewModels"
    xmlns:cnv="clr-namespace:ShredTheLog.Converters;assembly=ShredTheLog.Converters"
    >

    <DataTemplate DataType="{x:Type vm:ErrorViewModel}">
        <DockPanel>
            <TextBox DockPanel.Dock="Top" Height="100" IsReadOnly="True" VerticalContentAlignment="Center" TextWrapping="Wrap" Text="{Binding Path=Message, Mode=OneWay}" VerticalScrollBarVisibility="Auto" BorderThickness="0">
                <TextBox.Template>
                    <ControlTemplate TargetType="{x:Type TextBox}">
                        <ScrollViewer Margin="0" x:Name="PART_ContentHost" Padding="{TemplateBinding Padding}"/>
                    </ControlTemplate>
                </TextBox.Template>
            </TextBox>
            <Expander IsExpanded="False" IsEnabled="{Binding HasDetails}" >
                <TextBox IsReadOnly="True" TextWrapping="Wrap" Height="200" VerticalScrollBarVisibility="Auto" Text="{Binding Path=Details, Mode=OneWay}">
                    <TextBox.Template>
                        <ControlTemplate TargetType="{x:Type TextBox}">
                            <Border BorderBrush="Gray" BorderThickness="1">
                                <ScrollViewer Margin="0" x:Name="PART_ContentHost" Padding="{TemplateBinding Padding}"/>
                            </Border>
                        </ControlTemplate>
                    </TextBox.Template>
                </TextBox>
            </Expander>
        </DockPanel>
    </DataTemplate>
</ResourceDictionary>